bitkeeper revision 1.1668.1.6 (42a855abmDUqg5YrgIMWSBLOJP_HYg)
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Thu, 9 Jun 2005 14:43:55 +0000 (14:43 +0000)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Thu, 9 Jun 2005 14:43:55 +0000 (14:43 +0000)
Fast reflecting now working for breaks
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>

xen/arch/ia64/hyperprivop.S
xen/arch/ia64/patch/linux-2.6.11/efi.c
xen/arch/ia64/process.c

index 8f8497a22f60262ca92747bc0bdc300418f22bd3..6903c6678263d0133ab054b7ce9621b7099d88a5 100644 (file)
@@ -221,7 +221,7 @@ ENTRY(hyper_ssm_i)
 //     r19 == vpsr.ic (low 32 bits) | vpsr.i (high 32 bits)
 //     r31 == pr
 GLOBAL_ENTRY(fast_break_reflect)
-//#define FAST_BREAK
+#define FAST_BREAK
 #ifndef FAST_BREAK
        br.sptk.many dispatch_break_fault ;;
 #endif
@@ -233,6 +233,18 @@ GLOBAL_ENTRY(fast_break_reflect)
        extr.u r21=r30,IA64_PSR_PP_BIT,1 ;;
        cmp.ne p7,p0=r21,r0 ;;
 (p7)   br.sptk.many dispatch_break_fault ;;
+#if 1 /* special handling in case running on simulator */
+       movl r20=first_break;;
+       ld4 r23=[r20];;
+       movl r21=0x80001;
+       movl r22=0x80002;;
+       cmp.ne p7,p0=r23,r0;;
+(p7)   br.sptk.many dispatch_break_fault ;;
+       cmp.eq p7,p0=r21,r17;
+(p7)   br.sptk.many dispatch_break_fault ;;
+       cmp.eq p7,p0=r22,r17;
+(p7)   br.sptk.many dispatch_break_fault ;;
+#endif
 #ifdef FAST_REFLECT_CNT
        movl r20=fast_reflect_count+((0x2c00>>8)*8);;
        ld8 r21=[r20];;
index 9b85e43649fb18c304b0d6ff31fe6fecde16b316..e79d178edcd4e536e12fe601776e6ab7ebace648 100644 (file)
@@ -1,19 +1,23 @@
 --- ../../linux-2.6.11/arch/ia64/kernel/efi.c  2005-03-02 00:37:47.000000000 -0700
-+++ arch/ia64/efi.c    2005-06-08 20:23:39.000000000 -0600
-@@ -320,6 +320,12 @@
++++ arch/ia64/efi.c    2005-06-09 06:15:36.000000000 -0600
+@@ -320,6 +320,16 @@
                if (!(md->attribute & EFI_MEMORY_WB))
                        continue;
  
 +#ifdef XEN
 +// this works around a problem in the ski bootloader
-+              if (md->type != EFI_CONVENTIONAL_MEMORY)  continue;
++{
++              extern long running_on_sim;
++              if (running_on_sim && md->type != EFI_CONVENTIONAL_MEMORY)
++                      continue;
++}
 +// this is a temporary hack to avoid CONFIG_VIRTUAL_MEM_MAP
 +              if (md->phys_addr >= 0x100000000) continue;
 +#endif
                /*
                 * granule_addr is the base of md's first granule.
                 * [granule_addr - first_non_wb_addr) is guaranteed to
-@@ -719,6 +725,30 @@
+@@ -719,6 +729,30 @@
        return 0;
  }
  
index 826aae9380acd7c61ca6f9805469705ec80aabde..dfcba767abf30b3c6036cb798b63b1e138ea327f 100644 (file)
@@ -774,18 +774,19 @@ if (!running_on_sim) { printf("SSC_OPEN, not implemented on hardware.  (ignoring
        vcpu_increment_iip(current);
 }
 
+int first_break = 1;
+
 void
 ia64_handle_break (unsigned long ifa, struct pt_regs *regs, unsigned long isr, unsigned long iim)
 {
-       static int first_time = 1;
        struct domain *d = (struct domain *) current->domain;
        struct vcpu *v = (struct domain *) current;
        extern unsigned long running_on_sim;
 
-       if (first_time) {
+       if (first_break) {
                if (platform_is_hp_ski()) running_on_sim = 1;
                else running_on_sim = 0;
-               first_time = 0;
+               first_break = 0;
        }
        if (iim == 0x80001 || iim == 0x80002) { //FIXME: don't hardcode constant
                if (running_on_sim) do_ssc(vcpu_get_gr(current,36), regs);
@@ -821,6 +822,8 @@ ia64_handle_privop (unsigned long ifa, struct pt_regs *regs, unsigned long isr,
 #define INTR_TYPE_MAX  10
 UINT64 int_counts[INTR_TYPE_MAX];
 
+void dis_foo(void) { }
+
 void
 ia64_handle_reflection (unsigned long ifa, struct pt_regs *regs, unsigned long isr, unsigned long iim, unsigned long vector)
 {
@@ -854,7 +857,10 @@ ia64_handle_reflection (unsigned long ifa, struct pt_regs *regs, unsigned long i
                check_lazy_cover = 1;
                vector = IA64_DATA_ACCESS_RIGHTS_VECTOR; break;
            case 25:
-               vector = IA64_DISABLED_FPREG_VECTOR; break;
+               vector = IA64_DISABLED_FPREG_VECTOR;
+//printf("*** Attempting to handle disabled_fpreg\n");
+               dis_foo();
+               break;
            case 26:
 printf("*** NaT fault... attempting to handle as privop\n");
                vector = priv_emulate(v,regs,isr);